/**
 * @author jarvis.guo
 * @createddate 2008-7-15
 * @contact jarvis.guo@roboo.com
 * @Copyright All Rights Reserved, Roboo.com, 2006-2008
 * 
 */
package jarvis.fs;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.apache.lucene.store.Directory;

/****************************************************
 *Function:			<br>
 *Usage:			<br>
 * <code> <br>
 * <br>
 * </code>
 * <p>
 *Class Logic br>
 *
 *
 *<p>
 * @author jarvis.guo, jarvis.guo@roboo.com, 2008-7-15
 ****************************************************/
public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		Directory dir = Main.buildDirectory(new File(""));
		FeatureSelection df = new TC(dir);
		List<ComparableTerm> result = df.getFeatures();
		int termCount = 0;
		for(ComparableTerm t:result)
		{
			termCount++;
			System.out.println(t.getTermText()+"\t"+t.valueString());
		}
		System.out.println("termcount: "+termCount);

	}
	
	public static long getUsedMem()
	{
		System.gc();
		System.gc();
		System.gc();
		return Runtime.getRuntime().totalMemory()-Runtime.getRuntime().freeMemory();
	}

}
